3.429 \(\int \cos ^5(c+d x) (a+b \tan ^2(c+d x)) \, dx\)

Optimal. Leaf size=54 \[ \frac{(a-b) \sin ^5(c+d x)}{5 d}-\frac{(2 a-b) \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d} \]

[Out]

(a*Sin[c + d*x])/d - ((2*a - b)*Sin[c + d*x]^3)/(3*d) + ((a - b)*Sin[c + d*x]^5)/(5*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0496329, antiderivative size = 54, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3676, 373} \[ \frac{(a-b) \sin ^5(c+d x)}{5 d}-\frac{(2 a-b) \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5*(a + b*Tan[c + d*x]^2),x]

[Out]

(a*Sin[c + d*x])/d - ((2*a - b)*Sin[c + d*x]^3)/(3*d) + ((a - b)*Sin[c + d*x]^5)/(5*d)

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rule 373

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n
)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && IGtQ[q, 0]

Rubi steps

\begin{align*} \int \cos ^5(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \left (1-x^2\right ) \left (a-(a-b) x^2\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (a-(2 a-b) x^2+(a-b) x^4\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{a \sin (c+d x)}{d}-\frac{(2 a-b) \sin ^3(c+d x)}{3 d}+\frac{(a-b) \sin ^5(c+d x)}{5 d}\\ \end{align*}

Mathematica [A]  time = 0.185842, size = 52, normalized size = 0.96 \[ \frac{\sin (c+d x) (4 (7 a-2 b) \cos (2 (c+d x))+3 (a-b) \cos (4 (c+d x))+89 a+11 b)}{120 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5*(a + b*Tan[c + d*x]^2),x]

[Out]

((89*a + 11*b + 4*(7*a - 2*b)*Cos[2*(c + d*x)] + 3*(a - b)*Cos[4*(c + d*x)])*Sin[c + d*x])/(120*d)

________________________________________________________________________________________

Maple [A]  time = 0.082, size = 72, normalized size = 1.3 \begin{align*}{\frac{1}{d} \left ( b \left ( -{\frac{\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{5}}+{\frac{ \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{15}} \right ) +{\frac{\sin \left ( dx+c \right ) a}{5} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5*(a+b*tan(d*x+c)^2),x)

[Out]

1/d*(b*(-1/5*sin(d*x+c)*cos(d*x+c)^4+1/15*(2+cos(d*x+c)^2)*sin(d*x+c))+1/5*a*(8/3+cos(d*x+c)^4+4/3*cos(d*x+c)^
2)*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.01943, size = 63, normalized size = 1.17 \begin{align*} \frac{3 \,{\left (a - b\right )} \sin \left (d x + c\right )^{5} - 5 \,{\left (2 \, a - b\right )} \sin \left (d x + c\right )^{3} + 15 \, a \sin \left (d x + c\right )}{15 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*tan(d*x+c)^2),x, algorithm="maxima")

[Out]

1/15*(3*(a - b)*sin(d*x + c)^5 - 5*(2*a - b)*sin(d*x + c)^3 + 15*a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.48501, size = 117, normalized size = 2.17 \begin{align*} \frac{{\left (3 \,{\left (a - b\right )} \cos \left (d x + c\right )^{4} +{\left (4 \, a + b\right )} \cos \left (d x + c\right )^{2} + 8 \, a + 2 \, b\right )} \sin \left (d x + c\right )}{15 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*tan(d*x+c)^2),x, algorithm="fricas")

[Out]

1/15*(3*(a - b)*cos(d*x + c)^4 + (4*a + b)*cos(d*x + c)^2 + 8*a + 2*b)*sin(d*x + c)/d

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5*(a+b*tan(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 37.2951, size = 2898, normalized size = 53.67 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+b*tan(d*x+c)^2),x, algorithm="giac")

[Out]

-2/15*(15*a*tan(1/2*d*x)^10*tan(1/2*c)^9 + 15*a*tan(1/2*d*x)^9*tan(1/2*c)^10 + 20*a*tan(1/2*d*x)^10*tan(1/2*c)
^7 + 20*b*tan(1/2*d*x)^10*tan(1/2*c)^7 - 75*a*tan(1/2*d*x)^9*tan(1/2*c)^8 + 60*b*tan(1/2*d*x)^9*tan(1/2*c)^8 -
 75*a*tan(1/2*d*x)^8*tan(1/2*c)^9 + 60*b*tan(1/2*d*x)^8*tan(1/2*c)^9 + 20*a*tan(1/2*d*x)^7*tan(1/2*c)^10 + 20*
b*tan(1/2*d*x)^7*tan(1/2*c)^10 + 58*a*tan(1/2*d*x)^10*tan(1/2*c)^5 - 8*b*tan(1/2*d*x)^10*tan(1/2*c)^5 + 150*a*
tan(1/2*d*x)^9*tan(1/2*c)^6 - 180*b*tan(1/2*d*x)^9*tan(1/2*c)^6 + 700*a*tan(1/2*d*x)^8*tan(1/2*c)^7 - 500*b*ta
n(1/2*d*x)^8*tan(1/2*c)^7 + 700*a*tan(1/2*d*x)^7*tan(1/2*c)^8 - 500*b*tan(1/2*d*x)^7*tan(1/2*c)^8 + 150*a*tan(
1/2*d*x)^6*tan(1/2*c)^9 - 180*b*tan(1/2*d*x)^6*tan(1/2*c)^9 + 58*a*tan(1/2*d*x)^5*tan(1/2*c)^10 - 8*b*tan(1/2*
d*x)^5*tan(1/2*c)^10 + 20*a*tan(1/2*d*x)^10*tan(1/2*c)^3 + 20*b*tan(1/2*d*x)^10*tan(1/2*c)^3 - 150*a*tan(1/2*d
*x)^9*tan(1/2*c)^4 + 180*b*tan(1/2*d*x)^9*tan(1/2*c)^4 - 610*a*tan(1/2*d*x)^8*tan(1/2*c)^5 + 1040*b*tan(1/2*d*
x)^8*tan(1/2*c)^5 - 2200*a*tan(1/2*d*x)^7*tan(1/2*c)^6 + 2360*b*tan(1/2*d*x)^7*tan(1/2*c)^6 - 2200*a*tan(1/2*d
*x)^6*tan(1/2*c)^7 + 2360*b*tan(1/2*d*x)^6*tan(1/2*c)^7 - 610*a*tan(1/2*d*x)^5*tan(1/2*c)^8 + 1040*b*tan(1/2*d
*x)^5*tan(1/2*c)^8 - 150*a*tan(1/2*d*x)^4*tan(1/2*c)^9 + 180*b*tan(1/2*d*x)^4*tan(1/2*c)^9 + 20*a*tan(1/2*d*x)
^3*tan(1/2*c)^10 + 20*b*tan(1/2*d*x)^3*tan(1/2*c)^10 + 15*a*tan(1/2*d*x)^10*tan(1/2*c) + 75*a*tan(1/2*d*x)^9*t
an(1/2*c)^2 - 60*b*tan(1/2*d*x)^9*tan(1/2*c)^2 + 700*a*tan(1/2*d*x)^8*tan(1/2*c)^3 - 500*b*tan(1/2*d*x)^8*tan(
1/2*c)^3 + 2200*a*tan(1/2*d*x)^7*tan(1/2*c)^4 - 2360*b*tan(1/2*d*x)^7*tan(1/2*c)^4 + 5380*a*tan(1/2*d*x)^6*tan
(1/2*c)^5 - 5000*b*tan(1/2*d*x)^6*tan(1/2*c)^5 + 5380*a*tan(1/2*d*x)^5*tan(1/2*c)^6 - 5000*b*tan(1/2*d*x)^5*ta
n(1/2*c)^6 + 2200*a*tan(1/2*d*x)^4*tan(1/2*c)^7 - 2360*b*tan(1/2*d*x)^4*tan(1/2*c)^7 + 700*a*tan(1/2*d*x)^3*ta
n(1/2*c)^8 - 500*b*tan(1/2*d*x)^3*tan(1/2*c)^8 + 75*a*tan(1/2*d*x)^2*tan(1/2*c)^9 - 60*b*tan(1/2*d*x)^2*tan(1/
2*c)^9 + 15*a*tan(1/2*d*x)*tan(1/2*c)^10 - 15*a*tan(1/2*d*x)^9 - 75*a*tan(1/2*d*x)^8*tan(1/2*c) + 60*b*tan(1/2
*d*x)^8*tan(1/2*c) - 700*a*tan(1/2*d*x)^7*tan(1/2*c)^2 + 500*b*tan(1/2*d*x)^7*tan(1/2*c)^2 - 2200*a*tan(1/2*d*
x)^6*tan(1/2*c)^3 + 2360*b*tan(1/2*d*x)^6*tan(1/2*c)^3 - 5380*a*tan(1/2*d*x)^5*tan(1/2*c)^4 + 5000*b*tan(1/2*d
*x)^5*tan(1/2*c)^4 - 5380*a*tan(1/2*d*x)^4*tan(1/2*c)^5 + 5000*b*tan(1/2*d*x)^4*tan(1/2*c)^5 - 2200*a*tan(1/2*
d*x)^3*tan(1/2*c)^6 + 2360*b*tan(1/2*d*x)^3*tan(1/2*c)^6 - 700*a*tan(1/2*d*x)^2*tan(1/2*c)^7 + 500*b*tan(1/2*d
*x)^2*tan(1/2*c)^7 - 75*a*tan(1/2*d*x)*tan(1/2*c)^8 + 60*b*tan(1/2*d*x)*tan(1/2*c)^8 - 15*a*tan(1/2*c)^9 - 20*
a*tan(1/2*d*x)^7 - 20*b*tan(1/2*d*x)^7 + 150*a*tan(1/2*d*x)^6*tan(1/2*c) - 180*b*tan(1/2*d*x)^6*tan(1/2*c) + 6
10*a*tan(1/2*d*x)^5*tan(1/2*c)^2 - 1040*b*tan(1/2*d*x)^5*tan(1/2*c)^2 + 2200*a*tan(1/2*d*x)^4*tan(1/2*c)^3 - 2
360*b*tan(1/2*d*x)^4*tan(1/2*c)^3 + 2200*a*tan(1/2*d*x)^3*tan(1/2*c)^4 - 2360*b*tan(1/2*d*x)^3*tan(1/2*c)^4 +
610*a*tan(1/2*d*x)^2*tan(1/2*c)^5 - 1040*b*tan(1/2*d*x)^2*tan(1/2*c)^5 + 150*a*tan(1/2*d*x)*tan(1/2*c)^6 - 180
*b*tan(1/2*d*x)*tan(1/2*c)^6 - 20*a*tan(1/2*c)^7 - 20*b*tan(1/2*c)^7 - 58*a*tan(1/2*d*x)^5 + 8*b*tan(1/2*d*x)^
5 - 150*a*tan(1/2*d*x)^4*tan(1/2*c) + 180*b*tan(1/2*d*x)^4*tan(1/2*c) - 700*a*tan(1/2*d*x)^3*tan(1/2*c)^2 + 50
0*b*tan(1/2*d*x)^3*tan(1/2*c)^2 - 700*a*tan(1/2*d*x)^2*tan(1/2*c)^3 + 500*b*tan(1/2*d*x)^2*tan(1/2*c)^3 - 150*
a*tan(1/2*d*x)*tan(1/2*c)^4 + 180*b*tan(1/2*d*x)*tan(1/2*c)^4 - 58*a*tan(1/2*c)^5 + 8*b*tan(1/2*c)^5 - 20*a*ta
n(1/2*d*x)^3 - 20*b*tan(1/2*d*x)^3 + 75*a*tan(1/2*d*x)^2*tan(1/2*c) - 60*b*tan(1/2*d*x)^2*tan(1/2*c) + 75*a*ta
n(1/2*d*x)*tan(1/2*c)^2 - 60*b*tan(1/2*d*x)*tan(1/2*c)^2 - 20*a*tan(1/2*c)^3 - 20*b*tan(1/2*c)^3 - 15*a*tan(1/
2*d*x) - 15*a*tan(1/2*c))/(d*tan(1/2*d*x)^10*tan(1/2*c)^10 + 5*d*tan(1/2*d*x)^10*tan(1/2*c)^8 + 5*d*tan(1/2*d*
x)^8*tan(1/2*c)^10 + 10*d*tan(1/2*d*x)^10*tan(1/2*c)^6 + 25*d*tan(1/2*d*x)^8*tan(1/2*c)^8 + 10*d*tan(1/2*d*x)^
6*tan(1/2*c)^10 + 10*d*tan(1/2*d*x)^10*tan(1/2*c)^4 + 50*d*tan(1/2*d*x)^8*tan(1/2*c)^6 + 50*d*tan(1/2*d*x)^6*t
an(1/2*c)^8 + 10*d*tan(1/2*d*x)^4*tan(1/2*c)^10 + 5*d*tan(1/2*d*x)^10*tan(1/2*c)^2 + 50*d*tan(1/2*d*x)^8*tan(1
/2*c)^4 + 100*d*tan(1/2*d*x)^6*tan(1/2*c)^6 + 50*d*tan(1/2*d*x)^4*tan(1/2*c)^8 + 5*d*tan(1/2*d*x)^2*tan(1/2*c)
^10 + d*tan(1/2*d*x)^10 + 25*d*tan(1/2*d*x)^8*tan(1/2*c)^2 + 100*d*tan(1/2*d*x)^6*tan(1/2*c)^4 + 100*d*tan(1/2
*d*x)^4*tan(1/2*c)^6 + 25*d*tan(1/2*d*x)^2*tan(1/2*c)^8 + d*tan(1/2*c)^10 + 5*d*tan(1/2*d*x)^8 + 50*d*tan(1/2*
d*x)^6*tan(1/2*c)^2 + 100*d*tan(1/2*d*x)^4*tan(1/2*c)^4 + 50*d*tan(1/2*d*x)^2*tan(1/2*c)^6 + 5*d*tan(1/2*c)^8
+ 10*d*tan(1/2*d*x)^6 + 50*d*tan(1/2*d*x)^4*tan(1/2*c)^2 + 50*d*tan(1/2*d*x)^2*tan(1/2*c)^4 + 10*d*tan(1/2*c)^
6 + 10*d*tan(1/2*d*x)^4 + 25*d*tan(1/2*d*x)^2*tan(1/2*c)^2 + 10*d*tan(1/2*c)^4 + 5*d*tan(1/2*d*x)^2 + 5*d*tan(
1/2*c)^2 + d)